package com.service.test;

import com.service.bean.area.Area;
import com.service.bean.point.Point;
import com.service.tools.Tools;

public class Demo {

	public static void main(String[] args) {
		
//		Point p1 = new Point(30.44812400, 120.26409800);
//		Point p2 = new Point(30.45084500, 120.26258400);
//		Point p3 = new Point(30.44646700, 120.26378800);
//		Point p4 = new Point(30.44556800, 120.26170000);
//		Point p5 = new Point(30.44937000, 120.26340200);
//		Point p6 = new Point(30.44733000, 120.26453800);
//		Point p7 = new Point(30.44689900, 120.26478100);
//		Point p8 = new Point(30.45015200, 120.26297100);
//		Point p9 = new Point(30.44512400, 120.26066600);
//		Point p10 = new Point(30.44528700, 120.26105300);
		Point px = new Point(30.445163, 120.260756);
		
		Point[] points = {/*p1, p2, p3, p4, p5, p6, p7, p8, p9, p10*/px};
		double checkDis = 15;
		
		Point now = new Point(30.44513057, 120.26067025);
		Point last = new Point(30.44522838, 120.26097096);
		
		Area area = null;
		
		for (Point point : points) {
			area = Tools.getCheckWorkTimeArea(last, now, checkDis);
			for (Point p : area.points) {
				System.out.println(p.baiduLat + "," + p.baiduLng);
			}
			System.out.println(area.isInArea(point));
		}
		
		
	}
	
}
